<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>javascript 阶段</title>
</head>
<body>

    <script>
        var weather = {
            wea: "晴天",
            tem: "27°C",
            wind: "小于二级",
            air: "优",
            myAlert: function() {  
                // console.log(this.wea,this.tem,this.wind,this.air)
                alert(this.wea+","+this.tem+","+this.wind+","+this.air)
            },

            // 简写:
            // myAlert() {  
            //     // console.log(this.wea,this.tem,this.wind,this.air)
            //     alert(this.wea+","+this.tem+","+this.wind+","+this.air)
            // }
        };

        weather.myAlert();


    </script>
</body>
</html>